package com.zwy.space.service;

import com.zwy.space.domain.BlogType;
import com.zwy.space.mapper.TypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeService {
    @Autowired
    private TypeMapper typeMapper;


    public List<BlogType> findAllTypes() {
        return  typeMapper.findAllTypes();
    }

    public BlogType getType(int id) {
        return typeMapper.getType(id);
    }

    public BlogType getTypeByName(String name) {
        return  typeMapper.getTypeByName(name);
    }

    public int updateType(BlogType type) {
        return typeMapper.updateType(type);
    }

    public int deleteTypeById(int id) {
        return typeMapper.deleteTypeById(id);
    }

    public int saveType(BlogType type) {
        return typeMapper.saveType(type);
    }

    public List<BlogType> findAllTypesT() {
        return typeMapper.findAllTypesT();
    }

    public Object getTypeT(int id) {
        return typeMapper.getTypeT(id);
    }

    public BlogType getTypeByNameT(String name) {
        return  typeMapper.getTypeByNameT(name);
    }

    public int updateTypeT(BlogType type) {
        return typeMapper.updateTypeT(type);
    }

    public int deleteTypeByIdT(int id) {
        return typeMapper.deleteTypeByIdT(id);
    }

    public int saveTypeT(BlogType type) {
        return typeMapper.saveTypeT(type);
    }
}
